package requeteur.ejb.service;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import requeteur.ejb.commun.dto.Champ;
import requeteur.ejb.commun.dto.InformationBaseDeDonnees;
import requeteur.ejb.commun.dto.InformationConnection;
import requeteur.ejb.commun.dto.Table;
import requeteur.ejb.commun.exception.ConnectionException;
import requeteur.ejb.dao.DaoRecupererInformation;

/**
 *
 * @author Laurent
 * @version 0.1
 */
@Stateless
public class SrvRecupererInformation {

	@EJB
	private DaoRecupererInformation daoRecupererInformation;

	/**
	 * Constructeur de la classe <code>SrvRecupererInformation</code>.
	 */
	public SrvRecupererInformation() {
	}

	public InformationBaseDeDonnees getInformationBaseDeDonnees(InformationConnection informationConnection) throws ConnectionException {
		return daoRecupererInformation.getInformationBaseDeDonnees(informationConnection);
	}

	/**
	 *
	 * @param pBaseDeDonnees
	 * @return
	 * @throws ConnectionException
	 */
	public List<Table> listerTables(InformationConnection informationConnection) throws ConnectionException {
		return daoRecupererInformation.listerTables(informationConnection);
	}

	/**
	 *
	 * @param pTable
	 * @return
	 * @throws ConnectionException
	 */
	public List<Champ> listerChamps(Table pTable, InformationConnection informationConnection) throws ConnectionException {
		return daoRecupererInformation.listerChamps(pTable, informationConnection);
	}

}
